<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>prototype</title>
  <script>
    window.onload = function() {
      console.log(Date.prototype, typeof Date.prototype)
      function fn() {
        console.log('fn')
      }
      console.log(fn.prototype) // 默认指向一个 Object 空对象
      fn.prototype.test = function () {
        console.log('test')
      }
      console.log(fn.prototype)
      // 原型对象中有个 constructor 属性指向函数对象
      console.log(Date.prototype.constructor === Date) // true
      console.log(fn.prototype.constructor == fn) // true
    }
  </script>
</head>
<body>

</body>
</html>